home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung CD 2 (Tewi)(1994).iso
/
c
/
crosscom
/
tptc
/
acker.pas
next >
Wrap
Pascal/Delphi Source File
|
1988-03-25
|
369b
|
27 lines
(*
* Ackerman function
*)
program Acker;
Var
R : Integer;
function A(M, N : Integer) : Integer;
begin
if M = 0 then
A := N+1
else
if N = 0 then
A := A(M-1, 1)
else
A := A(M-1, A(M, N-1));
end;
begin
WriteLn('Ackerman function...');
R := A(3, 6);
WriteLn('finished, R=',R);
end.